package interfaz;


import java.rmi.RemoteException;
import java.util.List;

import type.ModuloType;
import type.ServiceType;
import domain.OrdenDespacho;
import dto.ArticuloDTO;
import dto.OrdenDespachoDTO;
import dto.SolicitudArticuloDTO;
import dto.URLDTO;
import dto.UserDTO;
import exceptions.ExceptionArticulo;
import exceptions.ExceptionOrdenDespacho;
import exceptions.ExceptionSolicitudArticulo;
import exceptions.ExceptionURL;
import exceptions.ExceptionUser;


@javax.ejb.Remote
public interface FacadeIf  {
	
	public UserDTO authenticate(String u, String p) throws ExceptionUser,RemoteException;
	public void cambioestado(String id);
	public List<UserDTO> getUsers() throws ExceptionUser,RemoteException;
	public void save(UserDTO user) throws ExceptionUser,RemoteException;
	
	public void despachar()throws ExceptionArticulo,RemoteException;
	public ArticuloDTO getArticulo(String codigo)throws ExceptionArticulo, RemoteException ;
	public List<ArticuloDTO> getArticulos(String filtro,String word) throws ExceptionArticulo,RemoteException;
	public void save(ArticuloDTO a) throws ExceptionArticulo,RemoteException;
	
	public void entrega(OrdenDespacho d)throws ExceptionOrdenDespacho,RemoteException;
	public OrdenDespachoDTO getOrdenDespacho(Integer id) throws ExceptionOrdenDespacho,RemoteException;
	public OrdenDespachoDTO getOrdenDespachoPorSolicitud(Integer idSolicitud)throws ExceptionOrdenDespacho,RemoteException;
	public List<OrdenDespachoDTO> getOrdenesDespacho(OrdenDespacho filtro) throws ExceptionOrdenDespacho,RemoteException;
	public OrdenDespachoDTO save(OrdenDespachoDTO ordenDespachoDTO) throws ExceptionOrdenDespacho,RemoteException;
	
	public String getUrl(ServiceType servicio, ModuloType modulo,String grupo) throws ExceptionURL, RemoteException ;
	public void save(URLDTO url) throws ExceptionURL, RemoteException;
	public List<URLDTO> getUrls()throws ExceptionURL, RemoteException;
	public void borrar(String parameter)throws ExceptionURL, RemoteException;
	public String getUrlActive(ServiceType ws, ModuloType logisticaMonitoreo)throws ExceptionURL, RemoteException;
	
	public List<SolicitudArticuloDTO> getSolicitudesArticulo() throws ExceptionSolicitudArticulo,RemoteException;
	public Integer save(SolicitudArticuloDTO sa) throws ExceptionSolicitudArticulo,RemoteException;
	
	public OrdenDespachoDTO notificarLogisticaMonitoreo(OrdenDespachoDTO o)throws Exception;
	public OrdenDespachoDTO notificarPortalWeb(OrdenDespachoDTO o)throws Exception;
	public SolicitudArticuloDTO getSolicitud(Integer id)throws Exception;
	public void enviarSolicitudDeposito(SolicitudArticuloDTO sa,String urlDeposito)throws Exception;
	
}
